<template>
  <div class="tabbar">
    <div class="content">
        <router-view/>
    </div>
    <van-tabbar v-model="active" >
      <van-tabbar-item @click="$router.push({ name:'home'})"><i class="iconfont icon-shouye1"></i><span>首页</span></van-tabbar-item>
      <van-tabbar-item @click="$router.push({ name:'my'})"><i class="iconfont icon-wode"></i><span>我的</span></van-tabbar-item>
    </van-tabbar>
  </div>
</template>

<script>
import { mapGetters, mapActions } from 'vuex'
export default {
  name: 'tabbar',
  computed: { ...mapGetters({ pageData: 'pageData'}) },
  data () {
    return {
       active: 0,
    }
  }
}
</script>

<!-- Add "scoped" attribute to limit CSS to this component only -->
<style lang="less" scope>
.tabbar {
  width: 100%;
  height: 100%;
    .content {
    width: 100%;
    height: 100%;
  }
  .van-tabbar {
    height: 56px;
    width: 100%;
    .iconfont {
      line-height: 1;
      display: block;
      text-align: center;
      color: #6F7C7D;
      margin-right: 1px;
      font-size: 20px;
    }
    span {
      display: block;
      text-align: center;
      font-size: 12px;
      font-family: PingFangSC-Regular, PingFang SC;
      font-weight: 400;
      color: #999999;
      line-height: 24px;
    }
    .van-tabbar-item--active {
      .iconfont {
        color: #000000;
      }
      span {
        color: #333333;
      }
    }
  }


}

</style>
